<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>所有图书</title>
</head>

<body background="/img/背景.jpg" style="background-size: 100% auto;">
<table align="center" border="5" width=70% height=60%>
    <tr>
        <td colspan="7"><h1>所有图书</h1></td>
    </tr>
    <tr>
        <td align="center" >编号</td>
        <td align="center">书名</td>
        <td align="center" width=10% >作者</td>
        <td align="center">出版社</td>
        <td align="center" width=15% >出版时间</td>
        <td align="center">简介</td>
        <td align="center">图书图片</td>
        <td align="center" width=12%>操作</td>
    </tr>

    <c:forEach items="${allBooks }" var="book">
        <tr>
            <td>${book.id }</td>
            <td>${book.name }</td>
            <td>${book.author }</td>
            <td>${book.bookconcern }</td>
            <td>${book.date }</td>
            <td>${book.synopsis }</td>
            <td>
                <c:if test="${book.pic !=null}">
                    <img src="/img/${book.pic}" width=100 height=100/>
                    <br/>
                </c:if>
            </td>
            <td align="center"><a href="deleteBookById?id=${book.id }" rel="external nofollow" >删除</a>|<a href="findById?id=${book.id} " rel="external nofollow" >修改</a></td>
        </tr>

    </c:forEach>
    <tr><td border="0"><input type="button" value="返回首页" onclick="javascript:window.location.href ='home.jsp';"/></td></tr>
</table>
</body>
</html>